<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/common/common.jsp"%>
<script type="text/javascript" >
$(function(){
	$('#workSearch').bind('click',function(){
		if($('#searchYear').val()==''||$('#searchMonth').val()==''){
    		$.messager.show({
				msg : '请输入年月'
			});
    		return;
    	}
		postcommit(ctx+'/pof/WorkMgmt!searchWork.action',{
			'entity.sendYear':$('#searchYear').val(),
    		'entity.sendMonth':$('#searchMonth').val()
		},function(o){
			if(o.success){
				var val = o.result;
				$('#showWorkDetail').children().remove();
				if(null==val||'null'==val){
					$('#showWorkDetail').append('<tr><td>无数据</td></tr>');
					return;
				}
				$('#showWorkDetail').append('<tr><td colspan="2">姓名</td><td colspan="2">年</td><td colspan="2">月</td></tr>');
				$('#showWorkDetail').append('<tr><td colspan="2">'+val.cname+'</td><td colspan="2">'+val.sendYear+'</td><td colspan="2">'+val.sendMonth+'</td></tr>');
				$('#showWorkDetail').append('<tr><td>工资</td><td>绩效</td><td>其他</td><td>半年奖</td><td>年终奖</td><td>扣金额</td></tr>');
				$('#showWorkDetail').append('<tr><td>'+val.payMoney+'</td><td>'+val.payMangce+'</td><td>'+val.payOther+'</td><td>'+val.payHalfYear+'</td><td>'+val.payYear+'</td><td>'+val.feeChange+'</td></tr>');
				$('#showWorkDetail').append('<tr><td colspan="6">合计收入</td></tr>');
				$('#showWorkDetail').append('<tr><td colspan="6">'+val.payAll+'</td></tr>');
				$('#showWorkDetail').append('<tr><td colspan="6">工作说明</td></tr>');
				$('#showWorkDetail').append('<tr><td colspan="6">'+val.msg+'</td></tr>');
			}
			
		});
		
	});
});
</script>
<div id="mainDiv"  fit="true" border="false">
	        <div id="easyui-title" style="display:none">
	            	员工工资查询
	        </div>
           <div class="top_toolbar_div" border="false">
           	        年<input id="searchYear" type="text" class="easyui-validatebox" validType="number[0,4]"  style="width: 100px;">   
           	        月<input id="searchMonth" type="text" class="easyui-validatebox" validType="number[0,2]"  style="width: 100px;">             
              <a href="#" class="easyui-linkbutton" iconCls="icon-search" id="workSearch">查询</a>
            </div>
            <div style="width: 100%;height: 100%;">
            	<table id="showWorkDetail" class="dataTable">
            		
            	</table>
            </div>
            
</div>



